package com.training.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the projects database table.
 * 
 */
@Entity
@Table(name="projects")
public class Project implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="project_id")
	private String projectId;

	private String project_Description;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="project_end_date")
	private Date projectEndDate;

	@Column(name="project_name")
	private String projectName;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="project_start_date")
	private Date projectStartDate;

	//bi-directional many-to-many association to EmpInformation
	@ManyToMany
	@JoinTable(
		name="emp_projects"
		, joinColumns={
			@JoinColumn(name="project_id")
			}
		, inverseJoinColumns={
			@JoinColumn(name="emp_id")
			}
		)
	private Set<EmpInformation> employeeInformations;

	public Project() {
	}

	public String getProjectId() {
		return this.projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public String getProject_Description() {
		return this.project_Description;
	}

	public void setProject_Description(String project_Description) {
		this.project_Description = project_Description;
	}

	public Date getProjectEndDate() {
		return this.projectEndDate;
	}

	public void setProjectEndDate(Date projectEndDate) {
		this.projectEndDate = projectEndDate;
	}

	public String getProjectName() {
		return this.projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public Date getProjectStartDate() {
		return this.projectStartDate;
	}

	public void setProjectStartDate(Date projectStartDate) {
		this.projectStartDate = projectStartDate;
	}

	public Set<EmpInformation> getEmployeeInformations() {
		return this.employeeInformations;
	}

	public void setEmployeeInformations(Set<EmpInformation> employeeInformations) {
		this.employeeInformations = employeeInformations;
	}

}